home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / m68k / 270 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.9 KB  |  46 lines

  1. Newsgroups: comp.sys.m68k
  2. Path: news.ridgecrest.ca.us!usenet
  3. From: mojaveg@ridgecrest.ca.us (Everett M. Greene)
  4. Subject: Re: CPU32 assembler question
  5. X-Nntp-Posting-Host: annex038
  6. Content-Type: text/plain; charset=iso-8859-1
  7. Message-ID: <19960223.7D79040.8E25@mojaveg.ridgecrest.ca.us>
  8. Sender: usenet@ridgecrest.ca.us (Ridgenet Usenet admin)
  9. Content-Transfer-Encoding: 8bit
  10. Organization: none that you'd notice
  11. X-Newssoftware: GRn 2.1 Feb 19, 1994
  12. References: <4g9cfa$7h3@news.onramp.net> <31288025.61CA@minn.net>
  13. Mime-Version: 1.0
  14. Date: Fri, 23 Feb 1996 17:25:49 GMT
  15.  
  16. In article <31288025.61CA@minn.net> Michael Carland <mgc@minn.net> writes:
  17. > Shay Collins wrote:
  18. > > when I do the following:
  19. > >   ori.b #$55,($1234,a0)
  20. > > the assembler generates:
  21. > > 0000310a 0028 0055 1234     ori.b #$55,($1234,a0)
  22. > > Now, when I do the following:
  23. > >   ori.b #$55,($9000,a0)
  24. > > the assembler generates:
  25. > > 00003116 0030 0055 0170     ori.b #$55,($9000,a0)
  26. > >          0000 9000
  27. > > The instructions it generates are not what I would expect.  It
  28. > > generates a mode 6 ori.b with a 32 bit displacement.  I would
  29. > > expect the assembler to generate instructions similar to the
  30. > > first example since there should be no difference.
  31.  
  32. > This would make sense to me if these instructions generated
  33. >  00003116 0030 0055 0170     ori.b #$55,($9000,a0)
  34. >           ffff 9000
  35. > since $9000 should be sign extended to $ffff9000. Try using
  36. > ($9000.b,a0), ($09000,a0) or some similar notation.
  37.  
  38. This is an example of syntactical ambiguity in ASM.  The $9000
  39. is presumed to be a positive value since you didn't say -$7000.
  40. Since +$9000 won't fit in 16 its, the assembler went to a 32-bit
  41. offset (and you'd better be executing on a 68020+).
  42.  
  43.     -----------------------------------------------------------------------
  44.     Everett M. Greene   (The Mojave Greene, crotalus scutulatus scutulatus)
  45.     Ridgecrest, Ca. 93555           Path: mojaveg@ridgecrest.ca.us
  46.